/**
 * 商品项 (Product) 类。
 */
public class Product {
    private String title;
    private double weight;
    private String description;
    private double price; // 假设有一个价格属性用于计算

    public Product(String title, double weight, String description, double price) {
        this.title = title;
        this.weight = weight;
        this.description = description;
        this.price = price;
    }

    // UML 操作: getPriceForQuantity() - 返回给定数量下的总价
    public double getPriceForQuantity(int quantity) {
        return this.price * quantity;
    }

    // UML 操作: getWeight() - 返回商品的单件重量
    public double getWeight() {
        return this.weight;
    }

    public String getTitle() {
        return title;
    }
}